package com.devunion.bogdan.util;

import java.util.Locale;
import java.util.ResourceBundle;

/**
 * Created by IntelliJ IDEA.
 * User: Leska
 * Date: 23.10.2004
 * Time: 23:07:25
 */
public class I18N {

    private static Locale currentLocale;
    private static ResourceBundle messages;

    static {
        // Locale("ru", "RU")
        currentLocale = Locale.getDefault();
        messages = ResourceBundle.getBundle("../resources/MessagesBundle_" + currentLocale, currentLocale);
    }

    public static String getString(String str) {
        return messages.getString(str);
    }

    public static void main(String[] args) {
        System.out.println("MessagesBundle_" + currentLocale);
        System.out.println(I18N.getString("1"));
    }
}
